<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
<head>
<!--
		Charisma v1.0.0

		Copyright 2012 Muhammad Usman
		Licensed under the Apache License v2.0
		http://www.apache.org/licenses/LICENSE-2.0

		http://usman.it
		http://twitter.com/halalit_usman
	-->
<meta charset="utf-8">
	<title>后台管理系统</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description"
	content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
<meta name="author" content="Muhammad Usman">

<!-- The styles -->
<link id="bs-css" href="css/bootstrap-cerulean.css" rel="stylesheet">
<style type="text/css">
body {
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}
</style>
<link href="css/bootstrap-responsive.css" rel="stylesheet">
<link href="css/charisma-app.css" rel="stylesheet">
<link href="css/jquery-ui-1.8.21.custom.css" rel="stylesheet">
<link href='css/fullcalendar.css' rel='stylesheet'>
<link href='css/fullcalendar.print.css' rel='stylesheet' media='print'>
<link href='css/chosen.css' rel='stylesheet'>
<link href='css/uniform.default.css' rel='stylesheet'>
<link href='css/colorbox.css' rel='stylesheet'>
<link href='css/jquery.cleditor.css' rel='stylesheet'>
<link href='css/jquery.noty.css' rel='stylesheet'>
<link href='css/noty_theme_default.css' rel='stylesheet'>
<link href='css/elfinder.min.css' rel='stylesheet'>
<link href='css/elfinder.theme.css' rel='stylesheet'>
<link href='css/jquery.iphone.toggle.css' rel='stylesheet'>
<link href='css/opa-icons.css' rel='stylesheet'>
<link href='css/uploadify.css' rel='stylesheet'>

<!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
	  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->

<!-- The fav icon -->
<link rel="shortcut icon" href="img/favicon.ico">

</head>

<body>
	<s:include value="header.jsp" />
	<!-- topbar ends -->
	<div class="container-fluid">
		<div class="row-fluid">

			<s:include value="left.jsp" />

			<div id="content" class="span10">
				<!-- content starts -->
				<div>
					<ul class="breadcrumb">
						<li><a href="index">主页</a> <span class="divider">/</span></li>
						<li><a href="#">柜体使用信息</a></li>
					</ul>
				</div>
				
				<a href="boxAdd.jsp?terminalID=${terminalID}" class="btn btn-large"><i class="icon-download-alt"></i>新增柜体</a>
				
				<div class="row-fluid" style="margin-top:20px">
					<table class="table table-striped table-bordered bootstrap-datatable  dataTable"  >
					<thead>
						<tr role="row">
							<td height="20" colspan="15" align="center" bgcolor="#EEEEEE"
								class="tablestyle_title">
								<s:property value="terminal.branch.branchShortAddress" />的<s:property value="terminal.name" />
							</td>
						</tr>
					</thead>
					
					<tbody>
						<s:iterator value="boxes" status="st">
							<s:if test="#st.count%3==1">
								<tr class="odd">
							</s:if>
							<s:if test="boxStatus==0">
								<td>箱号：<s:property
										value="boxNum" /> 类型：<s:property value="boxTypeName" /> <a class="ajax-link"
									href="setBoxFault?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">设为故障</a>
									<a class="ajax-link"
									href="forceUnCleanBoxAction?boxNum=<s:property value="boxNum" />&packageID=1&terminalID=<s:property value="terminalId" />">复位包裹</a>
									<a class="ajax-link"
									href="forceUnCleanBoxAction?boxNum=<s:property value="boxNum" />&goodsID=1&terminalID=<s:property value="terminalId" />">复位物品</a>
									<%-- <a
									href="getBoxById?boxID=<s:property value="boxId" />&terminalID=<s:property value="terminalId" />">修改</a> --%>
									<a class="ajax-link"
									href="packagesDetailByBoxNum?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史包裹</a>
									<a class="ajax-link"
									href="goods!getHistoryGoods?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史物品</a>
								</td>
							</s:if>
							<s:if test="boxStatus==1">
								<td style="background-color: #9AFF9A">箱号：<s:property
										value="boxNum" /> 类型：<s:property value="boxTypeName" /> <a class="ajax-link"
									href="boxPackage!getBoxStoreDetails?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">详情</a>
									<a
									href="forceCleanBoxAction!taken?boxNum=<s:property value="boxNum" />&packageID=<s:property value="parcelID" />&goodsID=<s:property value="goodsID" />&terminalID=<s:property value="terminalId" />&type=1" onclick="return openConfirm('确定开锁?')">开锁</a>
									<a class="ajax-link"
									href="packagesDetailByBoxNum?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史包裹</a>
									<a class="ajax-link"
									href="goods!getHistoryGoods?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史物品</a>
									<a
									href="forceCleanBoxAction!taken?boxNum=<s:property value="boxNum" />&packageID=<s:property value="parcelID" />&goodsID=<s:property value="goodsID" />&terminalID=<s:property value="terminalId" />&type=0" onclick="return openConfirm('确定清空?')">清空</a>
								</td>
							</s:if>
							<s:if test="boxStatus==2">
								<td style="background-color: #808080">箱号：<s:property
										value="boxNum" /> 类型：<s:property value="boxTypeName" /> <a class="ajax-link"
									href="boxPackage!getBoxStoreDetails?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">详情</a>
									<a class="ajax-link"
									href="packagesDetailByBoxNum?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史包裹</a>
									<a class="ajax-link"
									href="goods!getHistoryGoods?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史物品</a>
								</td>
							</s:if>
							<s:if test="boxStatus==3">
								<td style="background-color: #FF01A2">箱号：<s:property
										value="boxNum" /> 类型：<s:property value="boxTypeName" /> <a class="ajax-link"
									href="boxPackage!getBoxStoreDetails?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">订单详情</a>
									<a class="ajax-link"
									href="packagesDetailByBoxNum?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史包裹</a>
									<a class="ajax-link"
									href="goods!getHistoryGoods?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史物品</a>
								</td>
							</s:if>
							<s:if test="boxStatus==4">
								<td style="background-color: #FFFF00">箱号：<s:property
										value="boxNum" /> 类型：<s:property value="boxTypeName" /> <a class="ajax-link"
									href="boxPackage!getBoxStoreDetails?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">详情</a>
									<a
									href="forceCleanBoxAction!back?boxNum=<s:property value="boxNum" />&terminalID=<s:property value="terminalId" />&type=1" onclick="return openConfirm('确定开锁?')">远程开锁</a>
									<a class="ajax-link"
									href="packagesDetailByBoxNum?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史包裹</a>
									<a class="ajax-link"
									href="goods!getHistoryGoods?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史物品</a>
								</td>
							</s:if>
							<s:if test="boxStatus==5">
								<td style="background-color: #FFA07A;">箱号：<s:property
										value="boxNum" /> 类型：<s:property value="boxTypeName" /> <a class="ajax-link"
									href="setBoxAvailable?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">恢复为可用</a>
									<a class="ajax-link"
									href="packagesDetailByBoxNum?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史包裹</a>
									<a class="ajax-link"
									href="goods!getHistoryGoods?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史物品</a>
									<a class="ajax-link"
									href="deleteBox?boxID=<s:property value="boxId"/>&terminalID=<s:property value="terminalId" />">删除</a>
								</td>
							</s:if>
							<s:if test="boxStatus==6">
								<td style="background-color: #808080">箱号：（存件锁定）<s:property
										value="boxNum" /> 类型：<s:property value="boxTypeName" />
									<a class="ajax-link"
									href="packagesDetailByBoxNum?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史包裹</a>
									<a class="ajax-link"
									href="goods!getHistoryGoods?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史物品</a>
									<a
									href="forceCleanBoxAction!taken?boxNum=<s:property value="boxNum" />&packageID=<s:property value="parcelID" />&goodsID=<s:property value="goodsID" />&terminalID=<s:property value="terminalId" />&type=0" onclick="return openConfirm('确定清空?')">清空</a>
								</td>
							</s:if>
							<s:if test="boxStatus==7">
								<td style="background-color: #808080">箱号：（存件异常）<s:property
										value="boxNum" /> 类型：<s:property value="boxTypeName" />
									<a class="ajax-link"
									href="packagesDetailByBoxNum?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史包裹</a>
									<a class="ajax-link"
									href="goods!getHistoryGoods?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史物品</a>
									<a class="ajax-link"
									href="boxPackage!getAbnormalDetails?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">异常详情</a>
									<a
									href="forceCleanBoxAction!taken?boxNum=<s:property value="boxNum" />&packageID=<s:property value="parcelID" />&goodsID=<s:property value="goodsID" />&terminalID=<s:property value="terminalId" />&type=0" onclick="return openConfirm('确定清空?')">清空</a>
								</td>
							</s:if>
							<s:if test="boxStatus==8">
								<td style="background-color: #808080">箱号：（取件异常）<s:property
										value="boxNum" /> 类型：<s:property value="boxTypeName" /> <a class="ajax-link"
									href="boxPackage!getBoxStoreDetails?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">详情</a>
									<a class="ajax-link"
									href="packagesDetailByBoxNum?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史包裹</a>
									<a class="ajax-link"
									href="goods!getHistoryGoods?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">历史物品</a>
									<a class="ajax-link"
									href="boxPackage!getAbnormalDetails?boxNum=<s:property value="boxNum"/>&terminalID=<s:property value="terminalId" />">异常详情</a>
									<a
									href="forceCleanBoxAction!taken?boxNum=<s:property value="boxNum" />&packageID=<s:property value="parcelID" />&goodsID=<s:property value="goodsID" />&terminalID=<s:property value="terminalId" />&type=0" onclick="return openConfirm('确定清空?')">清空</a>
								</td>
							</s:if>
							<s:if test="#st.count%3==0">
								</tr>
							</s:if>
						</s:iterator>
						</tbody>
					</table>
	<div>
	             使用中<div style="display:inline-block;height:10px;width:10px;background:#9AFF9A ;border:1px solid #7F9DB9"></div>
                故障<div style="display:inline-block;height:10px;width:10px;background:#FFA07A ;border:1px solid #7F9DB9"></div>
               未使用<div style="display:inline-block;height:10px;width:10px;background:#fff ;border:1px solid #7F9DB9"></div>
               问题件<div style="display:inline-block;height:10px;width:10px;background:#FFFF00 ;border:1px solid #7F9DB9"></div>
               锁定件<div style="display:inline-block;height:10px;width:10px;background:#808080 ;border:1px solid #7F9DB9"></div>
               预定<div style="display:inline-block;height:10px;width:10px;background:#FF01A2 ;border:1px solid #7F9DB9"></div>
	</div>
				</div>
				<!-- content ends -->
			</div>
			<!--/#content.span10-->
		</div>
		<!--/fluid-row-->

		<hr>

	<s:include value="footer.jsp" />

	</div>
	<!--/.fluid-container-->

	<!-- external javascript
	================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->

	<!-- jQuery -->
	<script src="js/jquery-1.7.2.min.js"></script>
	<!-- jQuery UI -->
	<script src="js/jquery-ui-1.8.21.custom.min.js"></script>
	<!-- transition / effect library -->
	<script src="js/bootstrap-transition.js"></script>
	<!-- alert enhancer library -->
	<script src="js/bootstrap-alert.js"></script>
	<!-- modal / dialog library -->
	<script src="js/bootstrap-modal.js"></script>
	<!-- custom dropdown library -->
	<script src="js/bootstrap-dropdown.js"></script>
	<!-- scrolspy library -->
	<script src="js/bootstrap-scrollspy.js"></script>
	<!-- library for creating tabs -->
	<script src="js/bootstrap-tab.js"></script>
	<!-- library for advanced tooltip -->
	<script src="js/bootstrap-tooltip.js"></script>
	<!-- popover effect library -->
	<script src="js/bootstrap-popover.js"></script>
	<!-- button enhancer library -->
	<script src="js/bootstrap-button.js"></script>
	<!-- accordion library (optional, not used in demo) -->
	<script src="js/bootstrap-collapse.js"></script>
	<!-- carousel slideshow library (optional, not used in demo) -->
	<script src="js/bootstrap-carousel.js"></script>
	<!-- autocomplete library -->
	<script src="js/bootstrap-typeahead.js"></script>
	<!-- tour library -->
	<script src="js/bootstrap-tour.js"></script>
	<!-- library for cookie management -->
	<script src="js/jquery.cookie.js"></script>
	<!-- calander plugin -->
	<script src='js/fullcalendar.min.js'></script>
	<!-- data table plugin -->
	<script src='js/jquery.dataTables.min.js'></script>

	<!-- chart libraries start -->
	<script src="js/excanvas.js"></script>
	<script src="js/jquery.flot.min.js"></script>
	<script src="js/jquery.flot.pie.min.js"></script>
	<script src="js/jquery.flot.stack.js"></script>
	<script src="js/jquery.flot.resize.min.js"></script>
	<!-- chart libraries end -->

	<!-- select or dropdown enhancer -->
	<script src="js/jquery.chosen.min.js"></script>
	<!-- checkbox, radio, and file input styler -->
	<script src="js/jquery.uniform.min.js"></script>
	<!-- plugin for gallery image view -->
	<script src="js/jquery.colorbox.min.js"></script>
	<!-- rich text editor library -->
	<script src="js/jquery.cleditor.min.js"></script>
	<!-- notification plugin -->
	<script src="js/jquery.noty.js"></script>
	<!-- file manager library -->
	<script src="js/jquery.elfinder.min.js"></script>
	<!-- star rating plugin -->
	<script src="js/jquery.raty.min.js"></script>
	<!-- for iOS style toggle switch -->
	<script src="js/jquery.iphone.toggle.js"></script>
	<!-- autogrowing textarea plugin -->
	<script src="js/jquery.autogrow-textarea.js"></script>
	<!-- multiple file upload plugin -->
	<script src="js/jquery.uploadify-3.1.min.js"></script>
	<!-- history.js for cross-browser state change on ajax -->
	<script src="js/jquery.history.js"></script>
	<!-- application script for Charisma demo -->
	<script src="js/charisma.js"></script>
<script src="js/layer/layer.js"></script>  
<script type="text/javascript">
$(".ajax-link").live("click",function(){
	layer.load("<span style='color:blue;'>操作中，请稍后...</psan>");
});
function openConfirm(msg){
	if(confirm(msg)){
		layer.load("<span style='color:blue;'>操作中，请稍后...</psan>");
		window.event.returnValue = true;
	}else{
		window.event.returnValue = false;
	}
}
</script>

</body>
</html>
